﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<List<MovieDB.Data.Entities.Category>>" %>


<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Category
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="TitleInMainAreaContent" runat="server">
    Category
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table class="category-list">
        <tr>
            <th>&nbsp;</th> <%--Edit--%>
            <th>&nbsp;</th> <%--Delete--%>
            <th id="name">Name</th>
            <th id="description">Desciption</th>
        </tr>    
        <% foreach (var category in this.Model)
           {%>

        <tr>
            <td>
                <a href='<%=Url.Action("Edit", new { id = category.Id }) %>' title="Edit">
                    <img src="../../Content/images/edit-icon.png" alt="Edit" /></a>
            </td>
            <td>
                <a href='<%=Url.Action("Delete", new { id = category.Id }) %>' title="Delete" class="delete-confirm">
                    <img src="../../Content/images/delete-icon.png" alt="Delete" /></a>
            </td>
            <td><%= Html.WriteValue(category.Name) %></td>
            <td><%= Html.WriteValue(category.Description) %></td>
        </tr>

        <%
           }%>
           
    </table>

    <p>
    <a href='<%=Url.Action("Create") %>' title="Create"><img src="../../Content/images/add-icon.png" alt="Add" />&nbsp;Create category</a>
    </p>

</asp:Content>

